﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace CMS.Web.Site.Aspx {
	public partial class Site_MasterPage : System.Web.UI.MasterPage {

		protected override void OnInit(EventArgs e) {
			base.OnInit(e);

			int categoryId = 0;
			if (int.TryParse(HttpContext.Current.Request.QueryString["cid"], out categoryId))
				Core.Category.CurrentID = categoryId;
		}

		protected override void OnPreRender(EventArgs e) {
			base.OnPreRender(e);

			if (this.Page.Title == "无标题页")
				this.Page.Title = Core.Html.ParsePageTitle(Core.Category.CurrentID);
		}
	}
}
